#pragma once

#include<iostream>
#include<sstream>

class Task
{
public:
    Task()
    {}
    Task(int x , int y):a(x),b(y)
    {}
    void Execute()
    {
        result = a + b;
    }
    //重载()
    void operator()()
    {
        Execute();
    }
    //将执行过程转换为string 方便debug
    std::string Result2String()
    {
        std::stringstream ss;
        ss << a <<'+' << b << '=' << result <<std::endl;
        return ss.str();
    }
private:
    int a;
    int b;
    int result;
};